﻿@model IEnumerable<LightWeb.DomainModel.Post>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            BlogID
        </th>
        <th>
            Title
        </th>
        <th>
            Description
        </th>
        <th>
            Content
        </th>
        <th>
            Author
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.BlogID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @*@Server.HtmlDecode(item.Content);*@
                @(new MvcHtmlString(item.Content))
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Author)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.PostID }) |
                @Html.ActionLink("Details", "Details", new { id = item.PostID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.PostID })
            </td>
        </tr>
    }
</table>
